minios: Fix xenbus-id allocation loop.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 19 Feb 2007 15:50:29 +0000 (15:50 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 19 Feb 2007 15:50:29 +0000 (15:50 +0000)
Signed-off-by: Dietmar Hahn <dietmar.hahn@fujitsu-siemens.com>
extras/mini-os/xenbus/xenbus.c

index f2428c12fa38ccd6ad06cefef183d823f5ac04d3..f4832119478052a587ae6859d70c6409a718477a 100644 (file)
@@ -210,7 +210,7 @@ static int allocate_xenbus_id(void)
     }
     nr_live_reqs++;
     req_info[o_probe].in_use = 1;
-    probe = o_probe + 1;
+    probe = (o_probe + 1) % NR_REQS;
     spin_unlock(&req_lock);
     init_waitqueue_head(&req_info[o_probe].waitq);